#ifndef _BUTTON_H
#define _BUTTON_H

#include "my_sys.h"
#include "my_lib/my_log.h"
#include "my_lib/cmd_analyse.h"
#include "my_lib/beep.h"

#include "main.h"

#include "FreeRTOS.h"
#include "task.h"

#define BTN_SHORT_TICK   40
#define BTN_LONG_TICK    500


typedef enum
{
    BTN_None =0,
    BTN_Pressing,
    BTN_Short,
    BTN_Long,
}button_sta_enum_t;


typedef struct 
{
    uint32_t StartPressTick;
    uint8_t StartPressFlag;
    button_sta_enum_t ButtonSta;
}ButtonType;

void ButtonTask(void* param);
button_sta_enum_t AskButtonEvent(uint8_t ButtonNum, uint8_t clean);




#endif


